﻿function ForgotPasswordController($scope, service, $location, $http) {
    $scope.forgotPasswordUser = {
        Email: ""
    }

    $scope.forgotPassword = function () {
        var api = "api/forgotpassword";
        $http.post(api, $scope.forgotPasswordUser)
            .success(function () {
                service.Email = $scope.forgotPasswordUser.Email;
                $location.path("/ResetPassword");
            }).error(function (data) {
                console.log(data);
            });
    };
}